import numpy as np
import matplotlib.pyplot as plt

laplacian = np.array([[0,1,0],[1,4,1],[0,1,0]])
f=np.fft.fft2(laplacian)
f1shift=np.fft.fftshift(f)
img=np.log (np. abs(f1shift))
plt.imshow(img,'gray')
plt.show ()